Using Small C++ to create programs for the Doors Embedded OS

-- About the Directories --

This readme.txt file assumes that the SDK was unzipped under the directory 'SDK'.  It also assumes that Small C++ is located under the directory 'SmallC'.  Substitute with your own directories where needed.

-- Setup --

From the SDK, copy the files located in the "SDK\SmallC\Include" directory to the "SmallC\Include\DoorsOS" directory (you may have to create the DoorsOS directory).  Next copy the DoorsEmbedded.aoc file (under "SDK\SmallC") to the "SmallC\AOC" directory.

The include file DoorsOS.h will give you access to several functions including 'getTime()' and 'fork()'.  The DoorsEmbedded.aoc file includes the specifications for the Doors OS allowing Small C++ to generate the correct assembler code for the OS.

-- Samples --

Under the "SDK\SmallC\Samples" directory you can find the simple programs (testOS1.cpp and testOS2.cpp) designed to work with the Doors Embedded OS.  To compile this sample, copy it to the SmallC directory, and run SmallC.exe with the following arguments:

smallC /i Include\HC11\ /aoc DoorsEmbedded.aoc testOS1.cpp

Whenever you want to compile a program for the OS, use the /aoc DoorsEmbedded.aoc option.  Please read the Small C++ manual for more information.

Additionally, you may have to alter the default start address of a program depending on your HC11 configuration.  The default setting for the program start address is $2350.  You can change this using the /p compile option like so:

smallC /i Include\HC11\ /aoc DoorsEmbedded.aoc /p PROGRAM_START $0000 testOS1.cpp

Simply replace the $0000 with the correct address.  This address should be the same as PROGRAM_START within kernel.asm (see manual.txt for more info)

After running Small C++, you will be left with the file testOS1.asm - assemble this file using the included AS11 assembler.  The .s19 file can then be downloaded to the OS using the internal download feature or your usual HC11 downloader.

-- Conclusion --

If you need help setting this up or getting it to work, you can email me at wkrawec@hotmail.com .  Thank you.